<!--右边栏 Start-->
<div class="container-fluid" id="activitycoupon_editBody">
    <div class="row-fluid">
        <div class="span12">
            <div class="page-header fm-hd">
                <h4><span style="font-size:12px;">当前位置：营销工具&nbsp;&gt;&nbsp;</span>活动优惠券&nbsp;&gt;&nbsp;{{title}}</h4>
            </div>
            <!-- 新增优惠券/编辑优惠券  Start -->
            <div class="fm-body">
                <form class="form-horizontal frm-ddqr" id="editForm" name="editForm">
                	<input type="hidden" id="act_coupon_id" value="{{data.id}}" />
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label"><span class="redstar">*</span>活动优惠券种类：</label>
                        <div class="col-sm-5">
                            <select class="form-control w200" id="coupon_type">
                                <option value="51" {{if data.coupon_type == 51}}selected{{/if}}>满减优惠券</option>
                                <option value="53" {{if data.coupon_type == 53}}selected{{/if}}>商品特价优惠券</option>
                                <option value="52" {{if data.coupon_type == 52}}selected{{/if}}>企业团购抵用券</option>
                            </select>
                            <span class="Validform_checktip"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label"><span class="redstar">*</span>优惠券名称：</label>
                        <div class="col-sm-5">
                            <input type="text" id="act_name" name="act_name" placeholder="最大输入15个字" value="{{data.act_name}}" class="form-control" datatype="*1-15" nullmsg="最大输入15个字" errormsg="最大输入15个字">
                            <span class="Validform_checktip"></span>
                        </div>
                    </div>
                    
                    <div class="form-group" id="yhqsl" style="display:none;">
                        <label for="firstname" class="col-sm-3 control-label"><span class="redstar">*</span>优惠券数量：</label>
                        <div class="col-sm-5">
                        	<input type="text" id="total_num" name="total_num" placeholder="输入1~10000" value="{{data.total_num}}" class="form-control" datatype="/^[1-9][0-9]{0,3}$|10000/" nullmsg="输入1~10000" errormsg="输入1~10000">
                            <span class="Validform_checktip"></span>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label"><span class="redstar">*</span>优惠券关联商品：</label>
                        <div class="col-sm-5">
                            <select id="goods_id" name="goods_id" class="form-control w200 fl" datatype="selgoods" nullmsg="请选择关联商品" errormsg="请选择关联商品">
                                <option>请选择</option>
                                <option>测试商品一</option>
                                <option>测试商品一</option>
                                <option>测试商品一</option>
                                <option>测试商品一</option>
                            </select>
                            <button class="fl btn btn-primary ml10" type="button" id="price_conf" style="display:none;">配置价格</button>
                            <input type="hidden" id="goods_label_type" value="{{data.goods_label_type}}" />
                            <input type="hidden" id="goods_act_prices" value="{{data.goods_act_prices}}" />
                            <span class="Validform_checktip"></span>
                        </div>
                    </div>

                    <div class="form-group" id="old_price" style="display:none;">
                        <label for="firstname" class="col-sm-3 control-label">售价：</label>
                        <div class="col-sm-5">
                            <div class="sj-name">288</div>
                        </div>
                    </div>
                    
                    <div class="form-group" id="new_price" style="display:none;">
                        <label for="firstname" class="col-sm-3 control-label"><span class="redstar">*</span>优惠价：</label>
                        <div class="col-sm-5">
                            <input type="text" id="goods_coupon_price" name="goods_coupon_price" placeholder="输入0.01~9999.99" value="{{data.goods_coupon_price}}" class="form-control fl" datatype="coupon_price_check" nullmsg="输入0.01~9999.99" errormsg="输入0.01~9999.99">
                        	<span class="Validform_checktip"></span>
                        </div>
                    </div>

                    <div class="form-group" id="yhtj" style="display:none;">
                        <label for="firstname" class="col-sm-3 control-label"><span class="redstar">*</span>优惠条件：</label>
                        <div class="col-sm-5">
                            <div class="fl left-hg">用户消费满</div>
                            <div class="fl w200">
                            	<input type="text" id="coupon_condition" name="coupon_condition" placeholder="输入0.01~9999.99" value="{{data.coupon_condition}}" class="form-control fl" datatype="priceCompare" nullmsg="输入0.01~9999.99" errormsg="输入0.01~9999.99">
                                <span class="Validform_checktip"></span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group" id="yhnr" style="display:none;">
                        <label for="firstname" class="col-sm-3 control-label"><span class="redstar">*</span>优惠内容：</label>
                        <div class="col-sm-5">
                            <div class="fl left-hg">减免金额</div>
                            <div class="fl w200">
                                <input type="text" id="reduce_price" name="reduce_price" placeholder="输入0.01~9999.99" value="{{data.reduce_price}}" class="form-control fl" datatype="priceCompare" nullmsg="输入0.01~9999.99" errormsg="输入0.01~9999.99">
                                <span class="Validform_checktip"></span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label"><span class="redstar">*</span>使用有效期：</label>
                        <div class="col-sm-5" style="width:50%;">
                        	<input type="text" class="form-control fl w130" style="width:165px;" id="valid_begin_time" name="valid_begin_time" value="{{dateFormat(data.valid_begin_time,'yyyy-MM-dd hh:mm:ss')}}" data-date-format="yyyy-mm-dd HH:mi:ss" readonly="readonly"  onFocus="if($('#valid_begin_time').val()==''){$('#valid_end_time').val('')};WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss', minDate:'{{dateFormat(data.curDate,'yyyy-MM-dd hh:mm:ss')}}',maxDate:'#F{$dp.$D(\'valid_end_time\')||\'\'}'})" datatype="dateCompare">
		                    <span class="fl w40">到</span>
		                    <input type="text" class="form-control fl w130" style="width:165px;" id="valid_end_time" name="valid_end_time" value="{{dateFormat(data.valid_end_time,'yyyy-MM-dd hh:mm:ss')}}" data-date-format="yyyy-mm-dd HH:mi:ss" readonly="readonly" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss', minDate:'#F{$dp.$D(\'valid_begin_time\')||\'\'}'})" datatype="dateCompare">
		                    <span class="Validform_checktip"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">优惠提示语：</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" id="remark" maxlength="20" value="{{data.remark}}" placeholder="最大输入20个字符" />
                            <div class="f-gray mt10">（提示语内容可以引导用户购买更多次数的规格）</div>
                            <span class="Validform_checktip"></span>
                        </div>
                    </div>
                    <div class="form-group" id="fffw" style="display:none;">
                        <label for="firstname" class="col-sm-3 control-label"><span class="redstar">*</span>分发范围：</label>
                        <div class="col-sm-5">
                            <ul class="ul-radio">
                                <li>
                                    <input type="radio" name="user_range" class="chk" id="fffw1" value="1" {{if data.user_range==null || data.user_range==1 || data.user_range==0}} checked{{/if}}/>
                                    <label for="fffw1">全部用户</label>
                                </li>
                                <li>
                                    <input type="radio" name="user_range" class="chk" id="fffw2" value="2" {{if data.user_range==2}} checked{{/if}} />
                                    <label for="fffw2">指定用户</label>
                                </li>
                                <li>
                                    <input type="radio" name="user_range" class="chk" id="fffw3" value="3" {{if data.user_range==3}} checked{{/if}}/>
                                    <label for="fffw3">新注册用户</label>
                                </li>
                            </ul>
                            <div class="clearit"></div>
                            <div class="addperson" {{if data.user_range==2}}style="display:block;"{{else}}style="display:none;"{{/if}}>
                            	<input type="hidden" id="coupon_user_list" value="{{data.coupon_user_list}}" />
                                <div class="fl personbox"></div>
                                <div class="fl ml10">
                                    <button class="btn btn-primary" type="button" id="chose_user_btn">添加用户</button>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">   </label>
                        <div class="col-sm-5">
                            <input type="text" style="width:0px;border:0;" value="1"  id="chk_personbox" datatype="chk_personbox" nullmsg="至少指定一个用户" errormsg="至少指定一个用户" />
                            <span class="Validform_checktip"></span>
                        </div>
                    </div>
                    
                    <div class="form-group" id="qymc" style="display:none;">
                        <label for="firstname" class="col-sm-3 control-label"><span class="redstar">*</span>企业名称：</label>
                        <div class="col-sm-5">
                        	<input type="text" id="enter_name" name="enter_name" placeholder="最大输入20个字" value="{{data.enter_name}}" class="form-control" datatype="*1-15" nullmsg="最大输入20个字" errormsg="最大输入20个字">
                            <span class="Validform_checktip"></span>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <div class="spfb-btn" style="padding:0 70px 0 0;">
                            <button class="btn btn-primary" id="save_btn" type="button">提交</button>
                            <button type="button" class="btn btn-default" id="ret_btn">返回</button>
                        </div>
                    </div>
                </form>
            </div>
            <!-- 新增优惠券/编辑优惠券  End -->
        </div>
    </div>
    <!--右边栏 End-->
    
    
    
    
    
    <!-- 消息提示框  -->
    <div class="mes-container" id="msg_dialog">
    </div>
    <!-- 价格配置    模态框（Modal） 开始 -->
    <div class="modal fade coupon_price" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
        <div class="modal-dialog" id="coupon_content">
            <!-- /.modal-content -->
        </div>
    </div>
    <!-- 价格配置    模态框（Modal） 结束 -->
    <!-- 添加用户      模态框（Modal） 开始-->
    <div class="modal fade" id="user_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
        <div class="modal-dialog" id="user_coupon_content" style="width:700px; height:600px;">
            <!-- /.modal-content -->
        </div>
    </div>
    <!-- 添加用户      模态框（Modal） 结束-->
    <!-- 提交确认   模态框（Modal） 开始 -->
    <div class="modal fade" id="submit_enter_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
        <div class="modal-dialog" id="submit_enter_content">
            <!-- /.modal-content -->
            <div class="modal-content" style="width: 800px;">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="myModalLabel">提交确认</h4>
                </div>
                <div class="modal-body popfrm2">
                	<form class="form-horizontal frm-ddqr" id="submitContent" name="submitContent">
                	
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" type="button" class="btn btn-primary" id="submit_enter">确认</button>
                </div>
            </div>
        </div>
    </div>
    <!-- 提交确认    模态框（Modal） 结束 -->
</div>
